﻿<UserControl x:Class="Skyper.View.Panorama.RecentView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="480" d:DesignWidth="480">
    <UserControl.Resources>
        <DataTemplate x:Key="contactTemplate">
            <Image Grid.Column="0" x:Name="avatarImage" Height="100" Width="100" Source="{Binding Avatar,Converter={StaticResource avatarConverter}}" MinWidth="100" MinHeight="100" MaxWidth="100" MaxHeight="100" />
        </DataTemplate>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot">
        <ItemsControl ItemsSource="{Binding Contacts,Mode=OneWay,NotifyOnValidationError=True}" ItemTemplate="{StaticResource contactTemplate}">
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <toolkit:WrapPanel ItemHeight="200" ItemWidth="200" />
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
        </ItemsControl>
    </Grid>
</UserControl>
